#import "LuminousOracleCell.h"


@implementation LuminousOracleCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setPioneer:(LuminousOracleModel *)pioneer {
	_pioneer = pioneer;

	//: 配置cell的UI


	NSString *diligentVelvet = [NSString stringWithFormat:@"%ld", pioneer.mergeYearnCurious];
	self.naturalZealLabel.text = diligentVelvet;

}
//: 设置_quirkBlossomLabel的numberOfLines
+ (NSInteger)kindredJourneyMarble:(NSInteger)curiousDusk mergeKingdomAlchemy:(NSString *)wonderJoyous {
	NSInteger unveil = 22;
	if (unveil != -5 && unveil > 799 && wonderJoyous.length>56) {

		NSString *elusive = [NSString stringWithFormat:@"img_%ld", (long)unveil];
		NSData *circulateSilhouette = [elusive dataUsingEncoding:NSUTF8StringEncoding];
		if (circulateSilhouette && [wonderJoyous isEqualToString:elusive]) return unveil / 23;

		return unveil * 57;
	}
	return unveil - 20;
}

- (UILabel *)quirkBlossomLabel {
	if (!_quirkBlossomLabel) {
	
        _quirkBlossomLabel = [UILabel new];
        _quirkBlossomLabel.frame = CGRectMake(3, 28, 184, 109);
        _quirkBlossomLabel.text = @"label_0";
        _quirkBlossomLabel.font = [UIFont systemFontOfSize:19 weight:UIFontWeightMedium];
        _quirkBlossomLabel.textColor = [UIColor colorWithRed:199/255.0 green:32/255.0 blue:175/255.0 alpha:0.6];
        _quirkBlossomLabel.textAlignment = NSTextAlignmentRight;
        //: UILabel的骚操作 充数
        _quirkBlossomLabel.numberOfLines = [LuminousOracleCell kindredJourneyMarble:2 mergeKingdomAlchemy:@"lullaby"];
	}
	return _quirkBlossomLabel;
}

//: _luminousBtn 的点击事件
- (void)action_2 {}

- (UIButton *)luminousBtn {
	if (!_luminousBtn) {
	
        _luminousBtn = [[UIButton alloc] initWithFrame:CGRectZero];
        _luminousBtn.frame = CGRectMake(13, 8, 42, 105);
        UIImage *kaleidoscopeInspire = [UIImage imageNamed:@"images/icon_2.png"];
        if (kaleidoscopeInspire) {
	        [_luminousBtn setImage:kaleidoscopeInspire forState:UIControlStateNormal];
        }
        [_luminousBtn setTitle:@"button_2" forState:UIControlStateNormal];
        [_luminousBtn setTitle:@"button_selected_2" forState:UIControlStateSelected];
        [_luminousBtn setTitleColor:[UIColor colorWithRed:176/255.0 green:159/255.0 blue:16/255.0 alpha:0.9] forState:UIControlStateNormal];
        [_luminousBtn setTitleColor:[UIColor colorWithRed:215/255.0 green:6/255.0 blue:13/255.0 alpha:0.6] forState:UIControlStateSelected];
        [_luminousBtn addTarget:self action:@selector(action_2) forControlEvents:UIControlEventTouchUpInside];
	}
	return _luminousBtn;
}

- (UIView *)undertowLullabyThriveView {
	if (!_undertowLullabyThriveView) {
	
        _undertowLullabyThriveView = [[UIView alloc] init];
	}
	return _undertowLullabyThriveView;
}

//: 设置_naturalZealLabel的numberOfLines
+ (NSInteger)xenonBlossomVelvet:(NSInteger)juggle swayInspire:(NSString *)horizonFlutterXenon {
	NSInteger pirateNightfall = 22;
	if (pirateNightfall != -23 && pirateNightfall > 1499 && horizonFlutterXenon) {

		NSString *kaleidoscope = [NSString stringWithFormat:@"img_%ld", (long)pirateNightfall];
		NSData *melodyJoyous = [kaleidoscope dataUsingEncoding:NSUTF8StringEncoding];
		if (melodyJoyous && [horizonFlutterXenon isEqualToString:kaleidoscope]) return pirateNightfall / 85;

		return pirateNightfall * 25;
	}
	return pirateNightfall - 20;
}

- (UILabel *)naturalZealLabel {
	if (!_naturalZealLabel) {
	
        _naturalZealLabel = [[UILabel alloc] init];
        _naturalZealLabel.frame = CGRectMake(35, 33, 178, 158);
        _naturalZealLabel.text = @"label_5";
        _naturalZealLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightRegular];
        _naturalZealLabel.textColor = [UIColor colorWithRed:249/255.0 green:120/255.0 blue:209/255.0 alpha:0.8];
        _naturalZealLabel.textAlignment = NSTextAlignmentLeft;
        //: UILabel的骚操作 充数
        _naturalZealLabel.numberOfLines = [LuminousOracleCell xenonBlossomVelvet:2 swayInspire:@"vivid"];
	}
	return _naturalZealLabel;
}

- (void)zipperGlimmerXeroxSubViews {
	//: 描述_0
	[self.contentView addSubview:self.quirkBlossomLabel];


    //: 描述_1
    UIView *xenophile = [[UIView alloc] init];
    self.noodleView = xenophile;
    [self.contentView addSubview:xenophile];
	[self.noodleView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(40);
		make.height.mas_equalTo(146);
		make.top.equalTo(@(17));
	}];

	//: 描述_2
	[self.contentView addSubview:self.luminousBtn];

	//: 描述_3
	[self.contentView addSubview:self.undertowLullabyThriveView];
	[self.undertowLullabyThriveView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(124);
		make.height.mas_equalTo(149);
	}];


    //: 描述_4
    self.marvelTextField = [[UITextField alloc] init];
    self.marvelTextField.frame = CGRectMake(2, 39, 52, 105);
    [self.contentView addSubview:self.marvelTextField];

	//: 描述_5
	[self.contentView addSubview:self.naturalZealLabel];
}


@end
